package com.demo.listeners;

import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;

/**
 * Created by Aaron on 2017/7/2.
 */
public class Rerun implements IRetryAnalyzer {
    int index = 0;
    int reRunTimes = 1;

    public boolean retry(ITestResult iTestResult) {
        if(index < reRunTimes){
            index++;
            return true;
        }
        return false;
    }
}
